<template>
  <el-dialog
    :title="title"
    :visible.sync="dialogvisible"
    :close-on-click-modal="false"
    width="500px"
    :before-close="close"
  >
    <slot name="add-content"></slot>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
      <el-button type="primary" @click="$emit('determine')">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  name: "Dialog",
  props: {
    title: String,
    dialogvisible: Boolean,
  },
  methods:{
    close() {
      this.$emit('closeDialog')
    }
  },
};
</script>

<style lang="scss">
.el-dialog{
  .el-button{
    &:nth-child(2){
      color: #fff;
      border-color: #4180b1;
      background-color: #4180b1;
    }
  }
}
</style>